#pragma config(Sensor, dgtl1,  Bonp,           sensorTouch)
#pragma config(Sensor, dgtl2,  Ultrasonic,     sensorSONAR_inch)
#pragma config(Motor,  port2,           LeftMotor,     tmotorServoContinuousRotation, openLoop, reversed)
#pragma config(Motor,  port3,           RightMotor,    tmotorServoContinuousRotation, openLoop)

task main(){
  while(true){
    if(SensorValue(Ultrasonic)<3){
      motor[RightMotor]=80;
      motor[LeftMotor]=80;
    }
    else if(SensorValue(Ultrasonic)>3){
      motor[RightMotor]=80;
      motor[LeftMotor]=80;
    }
    else if(SensorValue(Bonp)==1){
      motor[RightMotor]=-80;
      motor[LeftMotor]=-80;
      wait1Msec(1500);
    }
  }
}
